export default function (plop) {
  plop.setGenerator('page', {
    description: 'generate a page',
    prompts: [
      {
        type: 'input',
        name: 'name',
        message: 'page name?'
      },
      {
        type: 'input',
        name: 'filepath',
        message: 'page parent dir?',
        default: '/'
      },{
        type: 'input',
        name: 'api',
        message: 'api prefix?',
        default: ''
      }
    ],
    actions: [
      {
        type: 'addMany',
        destination: './src/views/{{filepath}}{{name}}',
        templateFiles: './template/*.hbs'
      }
    ]
  })
}